package com.relife.core.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "sys_log", indexes = {@Index(columnList = "optDate")})
public class LogEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private Date optDate;
	private String optEntity;
	private String optUrl;
	private String optUser;
	private String optIp;
	private String optId;
	private String browser;
	/** 操作状态:0：登录，1：添加数据，2：修改数据，3：删除数据 */
	private Integer optType;
	/** 权限过滤 **/
	private String depCode;
	private String userCode;

	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getOptDate() {
		return optDate;
	}

	public void setOptDate(Date optDate) {
		this.optDate = optDate;
	}

	public String getOptEntity() {
		return optEntity;
	}

	public void setOptEntity(String optEntity) {
		this.optEntity = optEntity;
	}

	public String getOptUrl() {
		return optUrl;
	}

	public void setOptUrl(String optUrl) {
		this.optUrl = optUrl;
	}

	public String getOptUser() {
		return optUser;
	}

	public void setOptUser(String optUser) {
		this.optUser = optUser;
	}

	public String getOptIp() {
		return optIp;
	}

	public void setOptIp(String optIp) {
		this.optIp = optIp;
	}

	/** 操作状态:0：登录，1：添加数据，2：修改数据，3：删除数据 */
	public Integer getOptType() {
		return optType;
	}

	/** 操作状态:0：登录，1：添加数据，2：修改数据，3：删除数据 */
	public void setOptType(Integer optType) {
		this.optType = optType;
	}

	public String getOptId() {
		return optId;
	}

	public void setOptId(String optId) {
		this.optId = optId;
	}

	public String getBrowser() {
		return browser;
	}

	public void setBrowser(String browser) {
		this.browser = browser;
	}

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public String getDepCode() {
		return depCode;
	}

	public void setDepCode(String depCode) {
		this.depCode = depCode;
	}

}
